//
//  YYLSportTrack.h
//  YYLSport
//
//  Created by yangyinglei on 2017/4/22.
//  Copyright © 2017年 yangyinglei. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import "YYLPolyLine.h"

//运动的状态
typedef enum : NSUInteger {
    SportStateContinue = 0,
    SportStatePause,
    SportStateEnd,
} YYLSportState;

//运动的类型
typedef enum : NSUInteger {
    SpotrTypeWalking = 0,
    SpotrTypeRunning,
    SpotrTypeRiding,
} SportType;


//运动轨迹的模型   记录运动轨迹相关的颜色  距离  等         还有运动的逻辑判断都在模型里做的 减少控制器的代码
@interface YYLSportTrack : NSObject

//起点大头针模型
@property (nonatomic, strong, readonly) MAPointAnnotation *startAnno;
//运动类型
@property (nonatomic, assign, readonly) SportType sportType;
//运动的状态
@property (nonatomic, assign) YYLSportState sportState;
//运动类型图片名
@property (nonatomic, strong) NSString *sportTypeimgName;

//构造方法 开始运动
-(instancetype)initWithSpotrType:(SportType)sportType withSportState:(YYLSportState)sportState;

//添加折线
- (YYLPolyLine *)appendPolylineWithDest:(CLLocation *)dest;

@end
